package com.p2p.front.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.p2p.front.dal.dao.BorrowerPhotoDao;
import com.p2p.front.dal.model.BorrowerPhoto;
import com.p2p.front.service.BorrowerPhotoService;

@Service("borrowerPhotoService")
public class BorrowerPhotoServiceImpl implements BorrowerPhotoService{
	
	@Resource
	private BorrowerPhotoDao borrowerPhotoDao;
	
	@Override
	public List<BorrowerPhoto> findByUid(Long uid,Integer type) {
		return borrowerPhotoDao.findByUid(uid,type);
	}

	@Override
	public void save(BorrowerPhoto photo) {
		borrowerPhotoDao.save(photo);
	}

	@Override
	public BorrowerPhoto findById(Long id) {
		return borrowerPhotoDao.findById(id);
	}

	@Override
	public void deleteById(Long id) {
		borrowerPhotoDao.deleteById(id);
	}

	@Override
	public void updateImageStatus(Long id, int status) {
		borrowerPhotoDao.updateImageStatus(id,status);
	}

}
